package com.fjut.zr.judge_system.POJO.PO;

import java.sql.Timestamp;
import java.util.Objects;

public class TVjSubmitPO {
    private int id;
    private String rid;
    private Integer ojId;
    private String pid;
    private String language;
    private String code;
    private Integer judgeStatus;
    private Timestamp submitTime;

    public TVjSubmitPO() {

    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getRid() {
        return rid;
    }

    public void setRid(String rid) {
        this.rid = rid;
    }

    public Integer getOjId() {
        return ojId;
    }

    public void setOjId(Integer ojId) {
        this.ojId = ojId;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getJudgeStatus() {
        return judgeStatus;
    }

    public void setJudgeStatus(Integer judgeStatus) {
        this.judgeStatus = judgeStatus;
    }
    
    public Timestamp getSubmitTime() {
        return submitTime;
    }

    public void setSubmitTime(Timestamp submitTime) {
        this.submitTime = submitTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TVjSubmitPO that = (TVjSubmitPO) o;
        return id == that.id &&
                Objects.equals(rid, that.rid) &&
                Objects.equals(ojId, that.ojId) &&
                Objects.equals(pid, that.pid) &&
                Objects.equals(language, that.language) &&
                Objects.equals(code, that.code) &&
                Objects.equals(judgeStatus, that.judgeStatus) &&
                Objects.equals(submitTime, that.submitTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, rid, ojId, pid, language, code, judgeStatus, submitTime);
    }

    public TVjSubmitPO(String rid, Integer ojId, String pid, String language, String code, Integer judgeStatus, Timestamp submitTime) {
        this.rid = rid;
        this.ojId = ojId;
        this.pid = pid;
        this.language = language;
        this.code = code;
        this.judgeStatus = judgeStatus;
        this.submitTime = submitTime;
    }
}
